<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="catalog" tagdir="/WEB-INF/tags/catalog"%>
<%@ taglib prefix="product" tagdir="/WEB-INF/tags/product"%>
<%@ taglib prefix="customer" tagdir="/WEB-INF/tags/customer"%>

<form id="addConsultForm" action="<customer:consultUrl product="${product}"/>" onsubmit="addConsult();return false;" method="post">
    <div class="refer_form">
    	<em></em>
		<div class="content">
			<h3><fmt:message key="consult.addConsult"/></h3>
			<table cellspacing="0" cellpadding="0" border="0" width="100%">
		    	<c:if test="${appConfig.customerConsultRight==0 and empty currUser}">
		    		<%--如果允许匿名用户发表评论且当前未登录 --%>
		    		<tr>
			    		<th><fmt:message key="consultForm.customerName"/>:</th>
			    		<td><span><input class="inputtxt3" style="width:200px;" id="customerName" name="customerName" /></span></td>
		    		</tr>
		    	</c:if>
		    	<tr>
					<th>
						<fmt:message key="consultForm.message"/>:
					</th>
					<td>
						<span><textarea cols="" rows="5" class="textareatxt" style="width:400px" id="message" name="message" ></textarea><br/><br/></span>
					</td>
		    	</tr>
				<tr>
					<th></th>
					<td>
						<input type="hidden" name="doAction" value="addConsult"/>
						<input type="hidden" name="productId" value="${product.productId}"/>
						<input id="addConsultSubmit"  type="submit" class="submit" value=""/>
					</td>
				</tr>	
			</table>
		</div>
	</div>
</form>	

